package com.gaofeng.algo.io;

public class Hello {

    public static void main(String[] args) {
        String str = "你好hello";
        int len = str.length();
        for (int i = 0; i < len; i++) {
            int codePointAt = str.codePointAt(i);
            System.out.println("codePointAt:"+codePointAt);
        }
        int byte_len = str.getBytes().length;
        int codePointCount = str.codePointCount(0, str.length());
        System.out.println("字节长度:" + byte_len);
        System.out.println("字符长度:" + len);
        System.out.println("编码方式:" + System.getProperty("file.encoding"));
    }
}
